/*
 *
 * Copyright 2021-2025 Software Radio Systems Limited
 *
 * This file is part of srsRAN.
 *
 * srsRAN is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * srsRAN is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * A copy of the GNU Affero General Public License can be found in
 * the LICENSE file in the top-level directory of this distribution
 * and at http://www.gnu.org/licenses/.
 *
 */

#pragma once

namespace srsran {

class prach_buffer;
struct lower_phy_rx_symbol_context;
struct prach_buffer_context;
class shared_resource_grid;

/// \brief Lower physical layer notifier for events related to received symbols.
///
/// The events generated by this interface are triggered by the requests handled by the \ref lower_phy_request_handler
/// interface.
class lower_phy_rx_symbol_notifier
{
public:
  /// Default destructor.
  virtual ~lower_phy_rx_symbol_notifier() = default;

  /// \brief Notifies the completion of an OFDM symbol for a given context.
  ///
  /// \param[in] context Notification context.
  /// \param[in] grid    Resource grid that belongs to the context.
  virtual void on_rx_symbol(const lower_phy_rx_symbol_context& context, const shared_resource_grid& grid) = 0;

  /// \brief Notifies the completion of PRACH window.
  ///
  /// The lower PHY uses this method to notify that a PRACH window identified by \c context has been written in \c
  /// buffer.
  ///
  /// \param[in] context PRACH context.
  /// \param[in] buffer  Read-only PRACH buffer.
  virtual void on_rx_prach_window(const prach_buffer_context& context, const prach_buffer& buffer) = 0;
};

} // namespace srsran
